﻿/*
 * 代码优先：根据代码生成数据库 codefirst（先写model，然后生成数据库和表）
 * 数据库优先：创建数据库、数据表，根据数据表生成model（先创建表，然后根据表会生成model和上下文）
 * 模型优先：创建数据库，在vs建模型，生成表和model
 * 
 * 
 * **/


using Microsoft.EntityFrameworkCore;
using Practice.PH4_2104A.Shopping.SevenLayerFramework.Domin;

namespace Practice.PH4_2104A.DAL
{
    public class MyDbContext: DbContext
    {
        public MyDbContext(DbContextOptions<MyDbContext> options) : base(options)
        {
            //
        }

        //2023/09/11
       // public virtual DbSet<SystemUserModel> SystemUsers { get; set; }


        //20230918
        public virtual DbSet< BrandModel> Brands { get; set; }
        public virtual DbSet<CategoryModel> Categories { get; set; }
        public virtual DbSet<SPUModel> SPUs { get; set; }
        public virtual DbSet<SPUSpecModel> SPUSpecs { get; set; }
        public virtual DbSet<SPUSpecValueModel> SPUSpecValues { get; set; }
        public virtual DbSet<SKUImageModel> SKUImages { get; set; }
        public virtual DbSet<SKUModel> SKUs { get; set; }

        //20230923
        public virtual DbSet<OrderMasterModel> OrderMasters { get; set; }
        public virtual DbSet<OrderDetailModel>  OrderDetails { get; set; }
    }

}